home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
program
/
gemxx19.zoo
/
gem++19
/
man
/
img.man
< prev
next >
Wrap
Text File
|
1993-05-04
|
3KB
|
103 lines
GEM++ - C++ LIBRARIES FOR GEM/AES/VDI
NAME
IMG - Standard IMG object format
** MONOCHROME IMAGES ONLY **
DESCRIPTION
The "IMG" file format is a standard for GEM bitmaps. This class
can read and write such files, and manipulat the bitmap.
IMG manipulations are highly optimized. Best performance occurs
if the relative position-change methods are used.
Each IMG has a "current position" which can be used to manipulate
the bitmap.
CONSTRUCTORS
IMG(int width, int height)
Create an IMG with the given dimensions. The contents is left
uninitialised.
IMG(unsigned char* At, int width, int height)
Create an IMG with the given dimensions, using the raw image
data at the given location. Note that this constructor, in
combination with the Location(),Width(),Height() members can
be used to given two views into the same IMG - allowing more
than one "current position".
IMG(const char *)
Create an IMG by reading an IMG file.
METHODS
int operator!()
TRUE iff creation failed (insufficient memory or bad file).
int Save(const char *filename, int PatternLength=2)
Save the IMG as an IMG file with the given name. When optimising,
the given pattern length (default of 2 usually sufficient).
Note that this method does not do a perfect optimization when
patterned images are to be saved.
int operator() (int x, int y)
Move the "current position" to the given coordinate in the bitmap.
void Left()
Move the "current position" to the left (x--)
void Right()
Move the "current position" to the right (x++)
void Up()
Move the "current position" upwards (y--)
void Down()
Move the "current position" downwards (y++)
void Put(short)
Set the pixel at the "current position" to the given colour.
short Get()
Get the colour of the pixel at the "current position".
int Width()
int Height()
Return the dimensions of the IMG.
void Repos(long)
long Pos()
These methods allow the "current position" to be set and examined.
DO NOT manipulate the value - consider it ABSTRACT.
void Clear(int colour=0)
Completely fill the bitmap with the given colour (default blank)
void operator|= (const IMG&)
Apply a logical OR of another equal-sized bitmap with this one.
unsigned char* Location()
Returns the location of the bitmap's raw data.
SEE ALSO
GEMimageobject
BUGS
Bugs in GEM++ should be reported to warwick@cs.uq.oz.au
AUTHOR
Warwick Allison, 1993.
warwick@cs.uq.oz.au
COPYING
This functionality is part of the GEM++ library,
and is Copyright 1993 by Warwick W. Allison.
GEM++ is free and protected under the GNU Library General Public
License.
You are free to copy and modify these sources, provided you
acknowledge the origin by retaining this notice, and adhere to
the conditions described in the GNU LGPL.